import React from "react"
import { Provider } from "react-redux"
import { PersistGate } from "redux-persist/integration/react"
import { RouterProvider } from "react-router-dom"
import { ConfigProvider } from "antd"
import zhCN from "antd/locale/zh_CN"
import { StyleProvider, legacyLogicalPropertiesTransformer } from '@ant-design/cssinjs'
import { store, persistor } from "./reducers"
import router from "./routes"
function App() {
  return (
    <Provider store={store}>
      <PersistGate loading={null} persistor={persistor}>
        <ConfigProvider locale={zhCN}>
          <StyleProvider hashPriority="high" transformers={[legacyLogicalPropertiesTransformer]}>
            <RouterProvider
              router={router}
              fallbackElement={<div>loading</div>}
            />
          </StyleProvider>
        </ConfigProvider>
      </PersistGate>
    </Provider>
  )
}

export default App
